<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
    <head>
        <%@include file="../common/head.jspf" %>
    </head>

    <body class="sb-l-o sb-r-c" data-menu="" data-list="#li_employee">

        <!-- 主体内容开始 -->
        <div id="main">

            <!--侧边导航栏-->
            <%@include file="../common/sidebar.jspf" %>

            <!-- Start: Content-Wrapper -->
            <section id="content_wrapper">

                <!-- 顶部导航 -->
                <header id="topbar">
                    <div class="topbar-left">
                        <ol class="breadcrumb">
                            <li class="crumb-active">
                                <span>软擎科技</span>
                            </li>
                            <li class="crumb-icon">
                                <a href="dashboard"><span class="glyphicon glyphicon-home"></span></a>
                            </li>
                            <!-- 当前页 -->
                            <li class="crumb-trail">员工列表</li>
                        </ol>
                    </div>
                    <div class="topbar-right">
                        <!-- 登录信息 -->
                        <%@include file="../common/session.jspf" %>
                    </div>
                </header>
                <!-- 顶部导航结束 -->

                <!-- 页面内容开始 -->
                <section id="content">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="panel panel-visible">
                                <div class="panel-heading prn">
                                    <div class="panel-title pull-left hidden-xs">
                                        <span class="glyphicons glyphicons-vcard"></span>员工列表</div>
                                    <a class="btn btn-info pull-right" href="employee/add" role="button">
                                        <span class="glyphicon glyphicon-plus mr5"></span>添加员工</a>
                                </div>
                                <div class="panel-body pn">
                                    <table class="table table-striped table-hover" id="employeeList" cellspacing="0" width="100%">
                                        <thead>
                                            <tr>
                                                <th>登录名</th>
                                                <th>姓名</th>
                                                <th>手机号</th>
                                                <th>部门</th>
                                                <th>状态</th>
                                                <th>添加日期</th>
                                                <th></th>
                                            </tr>
                                        </thead>
                                        <tbody></tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>
                <!-- 页面内容结束 -->

            </section>
        </div>
        <!-- 主体内容结束 -->

        <div id="operationHTML" class="hidden">
            <div class="btn-group">
                <button type="button" class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" aria-expanded="true"><i class="fa fa-wrench mr5"></i>操作
                    <span class="caret ml5"></span>
                </button>
                <ul class="dropdown-menu pull-right" role="menu">
                    <li>
                        <a href="employee/index/#id" target="_blank"><span class="glyphicons glyphicons-user mr5"></span>查看详情</a>
                    </li>

                    <c:if test="${EmployeeSession.isAdmin() || EmployeeSession.permissions.contains('EMPLOYEE_ADMIN')}">
                        <li>
                            <a href="employee/edit/#id"><span class="glyphicons glyphicons-edit mr5"></span>编辑员工</a>
                        </li>

                        <li onclick="changeStatus('#id');">
                            <a href="javascript:;"><span class="glyphicons glyphicons-lock mr5"></span>冻结账号</a>
                        </li>
                        <li>
                            <a href="javascript:;" class="reset-pwd-btn" data-id="#id"><span class="glyphicons glyphicons-refresh mr5"></span>重置密码</a>
                        </li>
                    </c:if>

                    <!--
                    <li>
                                            <a href="employee/message/#id"><i class="fa fa-envelope mr5"></i>发站内信</a>
                                        </li>-->
                </ul>
            </div>
        </div>
        <!-- 公共函数 -->
        <%@include file="../common/scripts.jspf" %>
        <script type="text/javascript">
            var root_path = '${rootPath}';
        </script>
        <script src="${rootPath}/js/pages/employee/list.js" type="text/javascript"></script>
    </body>
</html>
